#pragma once

#include "../Position.h"
#include "CADCommand.h"
#include "../Models/Polygon.h"

// CCreatePolygonCmd command target

class CCreatePolygonCmd : public CCADCommand
{
	DECLARE_DYNAMIC(CCreatePolygonCmd)
public:
	CCreatePolygonCmd();
	virtual ~CCreatePolygonCmd();

	int GetType();
	int	OnLButtonDown(CDC* pDC, UINT nFlags, const CPosition& pos);
	int	OnMouseMove(CDC* pDC, UINT nFlags, const CPosition& pos);
	int	OnRButtonDown(CDC* pDC, UINT nFlags, const CPosition& pos);

	int	Cancel(CDC* pDC);

private:
	CPosition m_begin;
	CPosition m_end;
};


